package com.shop.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.user.po.Cart;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author banxia
 * @since 2023-02-25
 */
public interface CartMapper extends BaseMapper<Cart> {

    @Update("update cart set count=count+#{count} where id=#{id}")
    public int updateCount(@Param("id") Long id,
                           @Param("count") int count);

}
